﻿using GameFramework;
using GameFramework.Localization;
using System;
using ProcedureOwner = GameFramework.Fsm.IFsm<GameFramework.Procedure.IProcedureManager>;

namespace GFTest
{
    public class ProcedureLaunch : ProcedureBase
    {
        public override bool UseNativeDialog
        {
            get
            {
                return true;
            }
        }
        protected override void OnEnter(ProcedureOwner procedureOwner)
        {
            base.OnEnter(procedureOwner);
            string welcomeString = "HelloWorld!";
            Log.Info(welcomeString);
            PLog.Info(Programmer.ZhangPengHui, "Test");
        }

        // Use this for initialization
        private void Start()
        {

        }

        // Update is called once per frame
        protected override void OnUpdate(ProcedureOwner procedureOwner, float elapseSeconds, float realElapseSeconds)
        {
            base.OnUpdate(procedureOwner, elapseSeconds, realElapseSeconds);

#if UNITY_EDITOR
            // zph modify
            //if (!GameEntry.TimelineTest.Open)
            //{
            //    ChangeState<ProcedureSplash>(procedureOwner);
            //}
            //else
            //{
                ChangeState<ProcedurePreload>(procedureOwner);
            //}
#else
            ChangeState<ProcedureSplash>(procedureOwner);
#endif
        }
    }
}
